//
//  SlideTableViewCell.m
//  ZAKER
//
//  Created by dllo on 15/8/25.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "SlideTableViewCell.h"


@interface SlideTableViewCell ()


@end

@implementation SlideTableViewCell

-(void)dealloc
{
    
    [super dealloc];
    
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        CGFloat width = [UIScreen mainScreen].bounds.size.width / 3 - 10 * myWidth;
        for (int i = 0; i < 3; i++) {
            
            UIImageView *image = [[UIImageView alloc]initWithFrame:CGRectMake(i * width + 10 * myWidth, 10 * myHeight, width , 100 * myHeight)];
            image.tag = i + 1;
            [self.contentView addSubview:image];
            [image release];
            
        }
    }
    
    return self;
    
}

-(void)setValuesWityArray:(HotModel *)hotmodel
{
    
    NSArray *array = hotmodel.style[@"images"];
    UIImageView *first = (UIImageView *)[self.contentView viewWithTag:1];
    UIImageView *second = (UIImageView *)[self.contentView viewWithTag:2];
    UIImageView *third = (UIImageView *)[self.contentView viewWithTag:3];
    
    [first sd_setImageWithURL:[NSURL URLWithString:[array objectAtIndex:0]] placeholderImage:[UIImage imageNamed:@"pla.jpg"]];
    [second sd_setImageWithURL:[NSURL URLWithString:[array objectAtIndex:1]] placeholderImage:[UIImage imageNamed:@"pla.jpg"]];
    [third sd_setImageWithURL:[NSURL URLWithString:[array objectAtIndex:2]] placeholderImage:[UIImage imageNamed:@"pla.jpg"]];
    
}

- (void)awakeFromNib
{
   
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    
    [super setSelected:selected animated:animated];

}

@end
